{include file="index/head" /}
<script src="__PUBLIC__/public/ueditor/ueditor.config.js"></script>
<script src="__PUBLIC__/public/ueditor/ueditor.all.js"></script>
<div class="box">
  <div class="box-head">
    <h2>{$info.id?'编辑':'添加'}</h2>
    <a href="javascript:history.go(-1);" class="btn fr"><i class="icon-mail-reply (alias)"></i>返回</a></div>
  <div class="form">
    <form method="post" action="{:url('addschool')}" class="sycmsform">
      <input type="hidden" name="id" value="{$info.id}" />
    <ul>
      <li>
        <label>地区：</label>
          <div class="item">
            <div class="select"><i class="icon-caret-down"></i>
              <input type="hidden" name="city_id" value="{$info.city_id}" class="inputval" />          
              <input type="text" readonly="readonly" placeholder="请选择" class="input"/>
              <dl class="select-value syui-anim syui-anim-up">
                <dd data="0" {$info.city_id==0 ?'class=selected':''} >全国</dd>
                <dd data="1" {$info.city_id==1 ?'class=selected':''} >北京</dd>
                <dd data="2" {$info.city_id==2 ?'class=selected':''} >天津</dd>
                <dd data="3" {$info.city_id==3 ?'class=selected':''} >河北</dd>
                <dd data="4" {$info.city_id==4 ?'class=selected':''} >山西</dd>
                <dd data="5" {$info.city_id==5 ?'class=selected':''} >内蒙古</dd>
                <dd data="6" {$info.city_id==6 ?'class=selected':''} >辽宁</dd>
                <dd data="7" {$info.city_id==7 ?'class=selected':''} >吉林</dd>
                <dd data="8" {$info.city_id==8 ?'class=selected':''} >黑龙江</dd>
                <dd data="9" {$info.city_id==9 ?'class=selected':''} >上海</dd>
                <dd data="10" {$info.city_id==10 ?'class=selected':''} >江苏</dd>
                <dd data="11" {$info.city_id==11 ?'class=selected':''} >浙江</dd>
                <dd data="12" {$info.city_id==12 ?'class=selected':''} >安徽</dd>
                <dd data="13" {$info.city_id==13 ?'class=selected':''} >福建</dd>
                <dd data="14" {$info.city_id==14 ?'class=selected':''} >江西</dd>
                <dd data="15" {$info.city_id==15 ?'class=selected':''} >山东</dd>
                <dd data="16" {$info.city_id==16 ?'class=selected':''} >河南</dd>
                <dd data="17" {$info.city_id==17 ?'class=selected':''} >湖北</dd>
                <dd data="18" {$info.city_id==18 ?'class=selected':''} >湖南</dd>
                <dd data="19" {$info.city_id==19 ?'class=selected':''} >广东</dd>
                <dd data="20" {$info.city_id==20 ?'class=selected':''} >广西</dd>
                <dd data="21" {$info.city_id==21 ?'class=selected':''} >海南</dd>
                <dd data="22" {$info.city_id==22 ?'class=selected':''} >重庆</dd>
                <dd data="23" {$info.city_id==23 ?'class=selected':''} >四川</dd>
                <dd data="24" {$info.city_id==24 ?'class=selected':''} >贵州</dd>
                <dd data="25" {$info.city_id==25 ?'class=selected':''} >云南</dd>
                <dd data="26" {$info.city_id==26 ?'class=selected':''} >西藏</dd>
                <dd data="27" {$info.city_id==27 ?'class=selected':''} >陕西</dd>
                <dd data="28" {$info.city_id==28 ?'class=selected':''} >甘肃</dd>
                <dd data="29" {$info.city_id==29 ?'class=selected':''} >青海</dd>
                <dd data="30" {$info.city_id==30 ?'class=selected':''} >宁夏</dd>
                <dd data="31" {$info.city_id==31 ?'class=selected':''} >新疆</dd>
                <dd data="32" {$info.city_id==32 ?'class=selected':''} >台湾</dd>
                <dd data="33" {$info.city_id==33 ?'class=selected':''} >香港</dd>
                <dd data="34" {$info.city_id==34 ?'class=selected':''} >澳门</dd>
              </dl>
            </div>        
          </div>
      </li>
      <li>
        <label>学校名称：</label>
        <div class="item"><input type="text" name="school_name" value="{$info.school_name}" maxlength="15" class="input"  datatype="*"  nullmsg="请输入学院名称"/></div>
      </li>
      <li>
        <label>学校资质：</label>
        <div class="item radio">
          {volist name="label" id="vo"}
          <span><input type="checkbox" name="label[]" {if in_array($vo.id,$info.label)} checked="checked" {/if} value="{$vo.id}" onclick="_checkbox('istop')" /> {$vo.title}</span>
          {/volist}
        </div>
      </li>
      <!-- <li>
        <label>专业选择：</label>
        <div class="item radio">
          {volist name="gradation" id="vo"}
          <span><input type="checkbox" name="gradation[]" {if in_array($vo.id,$info.gradation)} checked="checked" {/if} value="{$vo.id}" onclick="_checkbox('istop')" /> {$vo.professional_title}</span>
          {/volist}
        </div>
      </li> -->
      <li>
        <label>层次：</label>
        <div class="item radio">
          <span><input type="checkbox" name="level[]" {if in_array(1,$info.level)} checked="checked" {/if} value="1" onclick="_checkbox('istop')" /> 高起专</span>
          <span><input type="checkbox" name="level[]" {if in_array(2,$info.level)} checked="checked" {/if} value="2" onclick="_checkbox('istop')" /> 专升本</span>
        </div>
      </li>
      <li>
        <label>属性：</label>
        <div class="item radio">
          <span><input type="checkbox" {if condition="$info.hot eq 1"} checked="checked" {/if}  onclick="_checkbox('hot')"/> 热门</span>
          <input type="hidden" name="hot" value="{$info.hot|default=0}"  />
        </div>
      </li>
      <li>
        <label>学校LOGO：</label>
        <div class="item">
          <input type="text" name="school_logo" datatype="*" nullmsg="请上传学院logo" readonly value="{$info.school_logo}" class="input"/>
          <button type="button" class="button fl" onclick="sycms.showupload(this)" id="school_logo" at="dg"><i class="icon-plus"></i>浏览上传</button>
          <div class="clear"></div>
          <div class="input-image"></div>
        </div>
      </li>
      <li>
        <label>学校封面：</label>
        <div class="item">
          <input type="text" name="school_thumb" datatype="*" nullmsg="请上传学院logo" readonly value="{$info.school_thumb}" class="input"/>
          <button type="button" class="button fl" onclick="sycms.showupload(this)" id="school_thumb" at="dg"><i class="icon-plus"></i>浏览上传</button>
          <div class="clear"></div>
          <div class="input-image"></div>
        </div>
      </li>
      <li>
        <label>院校背景：</label>
        <div class="item">
          <input type="text" name="background_logo" datatype="*" nullmsg="请上传学院logo" readonly value="{$info.background_logo}" class="input"/>
          <button type="button" class="button fl" onclick="sycms.showupload(this)" id="background_logo" at="dg"><i class="icon-plus"></i>浏览上传</button>
          <div class="clear"></div>
          <div class="input-image"></div>
        </div>
      </li>
      <li>
        <label>类型：</label>
        <div class="item">
          <div class="select"><i class="icon-caret-down"></i>
          <input type="hidden" name="type" value="{$info.type}" class="inputval" />          
          <input type="text" readonly="readonly" placeholder="请选择" class="input" datatype="*" nullmsg="请选择"/>
          <dl class="select-value syui-anim syui-anim-up">
            <dd data="1" {$info.type==1 ?'class=selected':''} >自学考试</dd>
            <dd data="2" {$info.type==2 ?'class=selected':''} >成人高考</dd>
            <dd data="3" {$info.type==3 ?'class=selected':''} >网教教育</dd>
            <dd data="4" {$info.type==4 ?'class=selected':''} >国开电大</dd>
            <dd data="4" {$info.type==5 ?'class=selected':''} >同等学力申硕</dd>
          </dl>
        </div>        
        </div>
      </li>
      <li>
        <label>报考人数：</label>
        <div class="item"><input type="text" name="number" value="{$info.number}" maxlength="15" class="input"  datatype="*"  nullmsg="请填写报考人数"/></div>
      </li>
      <li style="margin-bottom:15px; overflow:hidden;">
        <label>学校描述：</label>
        <div class="item">            
          <script id="content" name="content" datatype="*" nullmsg="请填写学院介绍" type="text/plain" style="width:90%;height:500px;">{$info.content}</script>   
          <script> var ue = UE.getEditor("content"); ue.ready(function() { ue.setHeight(500); });</script>    
        </div>
      </li>  
      <li style="margin-bottom:15px; overflow:hidden;">
        <label>报名须知：</label>
        <div class="item">            
          <script id="notes" name="notes" datatype="*" nullmsg="报名须知" type="text/plain" style="width:90%;height:500px;">{$info.notes}</script>   
          <script> var ue = UE.getEditor("notes"); ue.ready(function() { ue.setHeight(500); });</script>    
        </div>
      </li> 
      <li><label>&nbsp;</label><div class="item"><button type="submit" class="button"><i class="icon-check"></i>提交</button></div></li>
    </ul>
    </form>
  </div>
</div>
<script> sycms.submitform("{:url('school')}"); 
function _checkbox(name){
   var v = $("input[name="+name+"]").val();
       v = v==0?1:0;
   $("input[name="+name+"]").val(v);	
}
</script>